package com.enusoft.demo01.controller;

//import com.enusoft.demo01.model.Teacher;
import com.enusoft.demo01.model.Teacher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {

    @Value("${neu.className}")
    private String className;
    @Value("${neu.count}")
    private int count;
    //@Value("${neu.teacher}")
    @Autowired
    private Teacher teacher;

    @RequestMapping("Hello")
    @ResponseBody//json格式返回
    public String Hello(){
        return className+"+"+count+"+"+"hello spring boot"+teacher;
    }
}
